1. Field of the Invention
The present invention generally relates to a data storage apparatus, and more particularly, to a rewritable data storage apparatus such as a CD-RW disk drive and a DVD+RW disk drive that can interrupt background formatting when data storage is requested.
2. Description of the Related Art
Universal Disk Format (UDF) is known as the standard file format for rewritable data storage media. Since CD-RW and DVD+RW are further capable of overwriting in addition to being writable, they employ Random UDF that enables a disk drive to store and retrieve data randomly. In the case of CD-RW disks, a user is required to format the recording region of a CD-RW disk, entirely or partially, by recording dummy data before storing data.
In the case of DVD+RW disks, the user is still required to format a DVD+RW disk by recording dummy data in a recording region if the user wishes the DVD+RW disk to be retrievable (readable) by a conventional DVD-ROM drive.
Accordingly, the formatting of a disk takes time since the recording region of the disk needs to be filled with dummy data. The more storage capacity the disk has, the more time is required to format the disk. The user cannot store data until the formatting of the disk is completed.
A conventional solution to the above problem is background formatting wherein an optical disk drive formats a portion of an optical disk so that it can store data in or retrieve data from the optical disk even if the optical disk is hot fully formatted. Japanese Patent Laid-open Application No. 11-134799 discloses a data storage apparatus such as a CD-RW disk drive and a DVD+RW disk drive that formats an optical disk in the background so that it can store data in the optical disk within a short time after the background formatting is requested. In the background formatting, the data storage apparatus stores dummy data in any unrecorded (unformatted) region of the optical disk while no request from the host computer for data storage or retrieval is being processed. If the host computer requests for data storage or data retrieval during the background formatting, the optical disk drive interrupts the background formatting and stores (retrieves) data in (from) the optical disk.
Accordingly, the data storage apparatus performs the background formatting and the data storage (retrieval) requested by the host computer in parallel (concurrently). That is, even if the background formatting is proceeding, the data storage apparatus can store (retrieve) data in (from) any region of the optical disk. The user can eject the optical disk while the background formatting is proceeding.
It is necessary to record which portion of the optical disk has been formatted and in which portion of the optical disk data have been stored so that the optical disk drive can randomly store data in any region of the optical disk or eject the optical disk while the optical disk is being formatted in the background.
In the case of a DVD+RW disk, the above information is recorded in a region called a Formatting Disk Control Block (FDCB) in the lead-in region of the disk.
FDCB includes recording state information indicating whether the disk is not formatted, is being formatted, or has been formatted, address information indicating the address of the formatted region of the disk, and bit map information indicating whether a region is recorded or unrecorded.
When a partially formatted optical disk is inserted, the optical disk drive can resume background formatting and store dummy data only in the unrecorded region by referring to the FDCB.
FDCB is so important, especially in the case wherein the optical disk is ejected during the background formatting, that the optical disk drive corrupts user data if the information stored in FDCB is incorrect, by overwriting dummy data on the user data.
On the other hand, if FDCB is rewritten too often, the performance of the optical disk drive is lowered and the degrading of the optical disk is accelerated.